<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>字段首页</title>
  <meta name="renderer" content="webkit"> 
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">  
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 
  <meta name="apple-mobile-web-app-status-bar-style" content="black"> 
  <meta name="apple-mobile-web-app-capable" content="yes">  
  <meta name="format-detection" content="telephone=no"> 
  <link rel="stylesheet" type="text/css" href="/Public/admin/layui/css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/bootstrap/css/bootstrap.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/global.css" media="all">
  <link rel="stylesheet" type="text/css" href="/Public/admin/css/personal.css" media="all">
</head>
<body>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <a href="/admin/model"><button class="layui-btn layui-btn-danger">返回模型列表</button></a>
      <a href="/admin/field/add/modelid/<?php echo ($modelid); ?>"><button class="layui-btn"><i class="layui-icon">&#xe60a;</i>添加字段</button></a>
      <a href="/admin/field/priview/modelid/<?php echo ($modelid); ?>" target="_blank"><button class="layui-btn layui-btn-normal">预览模型</button></a>
      <form class="layui-form" action="/admin/field/listorder/modelid/<?php echo ($modelid); ?>" method="post">
      <table class="layui-table">
        <colgroup>
          <col width="100">
          <col width="150">
          <col width="150">
          <col width="150">
          <col width="100">
          <col width="100">
          <col width="100">
          <col width="100">
          <col width="100">
          <col>
        </colgroup>
        <thead align="center">
          <tr>
            <td>排序</td>
            <td>字段名</td>
            <td>别名</td>
            <td>字段类型</td>
            <td>系统字段</td>
            <td>必填</td>
            <td>搜索</td>
            <td>投稿</td>
            <td>是否显示</td>
            <td>管理操作</td>
          </tr>
        </thead>
        <tbody align="center">
          <?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
            <td>
              <div class="layui-input-inline">
                  <input name="listorders[<?php echo ($vo["fieldid"]); ?>]" required lay-verify="required" autocomplete="off" class="layui-input" type="text" value="<?php echo ($vo["listorder"]); ?>">
              </div>
            </td>
            <td><?php echo ($vo["field"]); ?></td>
            <td><?php echo ($vo["name"]); ?></td>
            <td><?php echo ($vo["formtype"]); ?></td>
            <td><?php if($vo['issystem'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
            <td><?php if($vo['minlength'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
            <td><?php if($vo['issearch'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
            <td><?php if($vo['isadd'] == 1): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
            <td><?php if($vo['disabled'] == 0): ?><font color="blue">√</font><?php else: ?> <font color="red">╳</font><?php endif; ?></td>
            <td>
              <a href="/admin/field/edit/modelid/<?php echo ($modelid); ?>/fieldid/<?php echo ($vo['fieldid']); ?>" class="layui-btn layui-btn-danger layui-btn-small"><i class="layui-icon"></i>修改</a>
              <a href="/admin/field/del/modelid/<?php echo ($modelid); ?>/fieldid/<?php echo ($vo['fieldid']); ?>" class="layui-btn layui-btn-small layui-btn-normal"><i class="layui-icon"></i> 删除</a>
              <?php if($vo['disabled'] == 0): ?><a href="/admin/field/disabled/modelid/<?php echo ($modelid); ?>/fieldid/<?php echo ($vo['fieldid']); ?>" class="layui-btn layui-btn-small"><i class="layui-icon"></i>隐藏<?php else: ?><a href="/admin/field/disabled/modelid/<?php echo ($modelid); ?>/fieldid/<?php echo ($vo['fieldid']); ?>" class="layui-btn layui-btn-small layui-btn-primary"><i class="layui-icon"></i>显示<?php endif; ?></a>
            </td>
          </tr><?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
      </table>
        <div class="layui-input-inline">
          <button class="layui-btn" lay-submit>排序</button>
        </div>
      </form>
    </div>
  </div>
</div>
<script type="text/javascript" src="/Public/admin/layui/layui.js"></script>
<script>
layui.use('form', function(){
  var form = layui.form();
});
</script>
</body>
</html>